import axios from 'axios'


var myaxios = {};
myaxios.install = function(Vue, options) {
  var axios_obj = axios.create({
    baseURL: 'http://192.168.103.191:8091/jeecg-boot/bigdata/bigscreen',
    // headers:{Authorization:window.localStorage.getItem('token')}
  })
  Vue.prototype.$myHttp = axios_obj;
}

export default myaxios;

// get使用及传参 this是vue对象
/**
 * this.$myHttp.get("getOrderMonitorInfo", {params: {year: year}})
  .then(function(data0) {
    if (data0.status == "200") {

    } else {
      alert("数据请求错误")
    }

  })
  .catch(function(error) {
    alert(error)
  })

 *
 * */

  // post使用及传参
 /**
  * this.$myHttp.post("getOrderMonitorInfo", {year: year})
    .then(function(data0) {
      if (data0.status == "200") {

      } else {
        alert("数据请求错误")
      }

    })
    .catch(function(error) {
      alert(error)
    })
 *
 * */
